#ifndef Converter_First
#define Converter_First
#ifdef __GNUG__
#pragma interface
#endif

#include "Object.h"
#include "Symbol.h"

class Data;
class OrdCollection;

//---- Converter ---------------------------------------------------------------

class Converter : public Object {
public:
	MetaDef(Converter);
	Converter();

	const char *AsString();

	static OrdCollection *CollectConverters();
	static OrdCollection *CollectOutputConverters(Object *op);
	static Converter *FindConverter(Data *data, Class *want, OrdCollection *l= 0);
	static void CleanUp();

	virtual bool CanConvert(Data *data, Class *want);
	virtual Object *Convert(Data *data, Class *want);
	virtual bool CanConvertTo(Object*);
	virtual bool ConvertTo(Data *data, Object *op);

private:
	static OrdCollection *filters;
};

#endif
